home *** CD-ROM | disk | FTP | other *** search
/ Exame Informatica 139 / Exame Informatica 139.iso / Revista / Flash / Uniform Server / diskw / home / admin / www / phpMyAdmin / main.php < prev    next >
Encoding:
PHP Script  |  2005-09-06  |  23.6 KB  |  656 lines

  1. <?php
  2. /* $Id: main.php,v 2.73.2.1 2005/09/07 07:20:00 nijel Exp $ */
  3. // vim: expandtab sw=4 ts=4 sts=4:
  4.  
  5. /**
  6.  * Don't display the page heading
  7.  */
  8. define('PMA_DISPLAY_HEADING', 0);
  9.  
  10. /**
  11.  * Gets some core libraries and displays a top message if required
  12.  */
  13. require_once('./libraries/grab_globals.lib.php');
  14. require_once('./libraries/common.lib.php');
  15. setcookie('pma_lang', $lang, time() + 60*60*24*30, $cookie_path, '', $is_https);
  16. if (isset($convcharset)) {
  17.     setcookie('pma_charset', $convcharset, time() + 60*60*24*30, $cookie_path, '', $is_https);
  18. }
  19.  
  20. /**
  21.  * Includes the ThemeManager
  22.  */
  23. require_once('./libraries/select_theme.lib.php');
  24. // Defines the "item" image depending on text direction
  25. $item_img = $GLOBALS['pmaThemeImage'] . 'item_ltr.png';
  26. // Defines for MainPageIconic
  27. $str_iconic_list    = '';
  28. $str_iconic_colspan = '';
  29. $str_normal_list    = '<td valign="top" align="right" width="16"><img src="'.$item_img.'" border="0" hspace="2" vspace="5" /></td>';
  30. if ($cfg['MainPageIconic']) {
  31.     $str_iconic_list .= "<td width=\"16\" valign=\"top\" align=\"center\" nowrap=\"nowrap\">%1\$s"
  32.                       . "<img src=\"" . $pmaThemeImage . "%2\$s\" border=\"0\" width=\"16\" height=\"16\" hspace=\"2\" alt=\"%3\$s\" />"
  33.                       . "%4\$s</td>";
  34.     $str_iconic_colspan .= ' colspan="2"';
  35. } else {
  36.     $str_iconic_list = '';
  37.     $str_iconic_colspan = ' colspan="2"';
  38. }
  39.  
  40. // Handles some variables that may have been sent by the calling script
  41. if (isset($db)) {
  42.     unset($db);
  43. }
  44. if (isset($table)) {
  45.     unset($table);
  46. }
  47. $show_query = '1';
  48. require_once('./header.inc.php');
  49. echo "\n";
  50.  
  51.  
  52. /**
  53.  * Displays the welcome message and the server informations
  54.  */
  55.  
  56. // note: for proper display of RTL languages, I removed the
  57. //       align="left" in the next <td> tag
  58. ?>
  59. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  60.     <tr>
  61.         <td valign="top">
  62.         <h1>
  63.         <?php
  64.         echo sprintf($strWelcome, ' phpMyAdmin ' . PMA_VERSION . '');
  65.         ?>
  66.         </h1>
  67. <?php
  68.  
  69. // Don't display server info if $server == 0 (no server selected)
  70. // loic1: modified in order to have a valid words order whatever is the
  71. //        language used
  72. if ($server > 0) {
  73.     // robbat2: Use the verbose name of the server instead of the hostname
  74.     //          if a value is set
  75.     if (!empty($cfg['Server']['verbose'])) {
  76.         $server_info = $cfg['Server']['verbose'];
  77.     } else {
  78.         $server_info = $cfg['Server']['host'];
  79.         $server_info .= (empty($cfg['Server']['port']) ? '' : ':' . $cfg['Server']['port']);
  80.     }
  81.     // loic1: skip this because it's not a so good idea to display sockets
  82.     //        used to everybody
  83.     // if (!empty($cfg['Server']['socket']) && PMA_PHP_INT_VERSION >= 30010) {
  84.     //     $server_info .= ':' . $cfg['Server']['socket'];
  85.     // }
  86.     $res                           = PMA_DBI_query('SELECT USER();');
  87.     list($mysql_cur_user_and_host) = PMA_DBI_fetch_row($res);
  88.     $mysql_cur_user                = substr($mysql_cur_user_and_host, 0, strrpos($mysql_cur_user_and_host, '@'));
  89.  
  90.     PMA_DBI_free_result($res);
  91.     unset($res, $row);
  92.  
  93.     $full_string     = str_replace('%pma_s1%', PMA_MYSQL_STR_VERSION, $strMySQLServerProcess);
  94.     $full_string     = str_replace('%pma_s2%', $server_info, $full_string);
  95.     $full_string     = str_replace('%pma_s3%', htmlspecialchars($mysql_cur_user_and_host), $full_string);
  96.  
  97.     echo '<p><b>' . $full_string . '</b></p>' . "\n";
  98. } // end if
  99.  
  100.  
  101. // Any message to display?
  102.  
  103. if (isset($message)) {
  104.     PMA_showMessage($message);
  105.     unset($message);
  106. }
  107.  
  108. /**
  109.  * Reload mysql (flush privileges)
  110.  */
  111. if (($server > 0) && isset($mode) && ($mode == 'reload')) {
  112.     $result = PMA_DBI_query('FLUSH PRIVILEGES');
  113.     echo '<p><b>';
  114.     if ($result != 0) {
  115.         echo $strMySQLReloaded;
  116.     } else {
  117.         echo $strReloadFailed;
  118.     }
  119.     unset($result);
  120.     echo '</b></p>' . "\n\n";
  121. }
  122. ?>
  123.         </td>
  124.         <?php
  125.         if (@file_exists($pmaThemeImage . 'logo_right.png')) {
  126.             // td and img seems not to obey the general dir= of the html tag
  127.             if ($GLOBALS['text_dir'] == 'ltr') {
  128.                $tmp_align = 'right';
  129.             } else {
  130.                $tmp_align = 'left';
  131.             }
  132.             echo '        <td align="' . $tmp_align . '" valign="top">' . "\n";
  133.             echo '            <img src="' . $pmaThemeImage . 'logo_right.png" alt="phpMyAdmin - Logo" border="0" hspace="5" vspace="5" align="' . $tmp_align . '" />' . "\n";
  134.             echo '        </td>';
  135.         }
  136.         ?>
  137. </tr></table>
  138. <hr />
  139. <?php
  140.  
  141. /**
  142.  * Displays the MySQL servers choice form
  143.  */
  144. if (!$cfg['LeftDisplayServers']) {
  145.     $show_server_left = FALSE;
  146.     include('./libraries/select_server.lib.php');
  147. }
  148.  
  149. // nested table needed
  150. ?>
  151. <table border="0" cellpadding="0" cellspacing="0">
  152. <tr>
  153. <td valign="top">
  154. <!-- MySQL and phpMyAdmin related links -->
  155. <?php
  156. /**
  157.  * Displays the mysql server related links
  158.  */
  159. $is_superuser        = FALSE;
  160.  
  161. if ($server > 0) {
  162.  
  163.     require_once('./libraries/check_user_privileges.lib.php');
  164.  
  165.     $common_url_query =  PMA_generate_common_url();
  166.  
  167.     if ($is_superuser) {
  168.         $cfg['ShowMysqlInfo']   = TRUE;
  169.         $cfg['ShowMysqlVars']   = TRUE;
  170.         $cfg['ShowChgPassword'] = TRUE;
  171.     }
  172.     if ($cfg['Server']['auth_type'] == 'config') {
  173.         $cfg['ShowChgPassword'] = FALSE;
  174.     }
  175.  
  176.     // loic1: Displays the MySQL column only if at least one feature has to be
  177.     //        displayed
  178.     if ($is_superuser || $is_create_priv || $is_process_priv || $is_reload_priv
  179.         || $cfg['ShowMysqlInfo'] || $cfg['ShowMysqlVars'] || $cfg['ShowChgPassword']
  180.         || $cfg['Server']['auth_type'] != 'config') {
  181. ?>
  182. <!-- MySQL server related links -->
  183. <table cellpadding="3" cellspacing="0">
  184.     <tr>
  185.         <th class="tblHeaders"<?php echo $str_iconic_colspan; ?>>  MySQL</th>
  186.     </tr>
  187.     <tr><?php
  188.         echo '        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'','b_newdb.png',$strCreateNewDatabase,'') : $str_normal_list);
  189. ?>
  190.     <!-- db creation form -->
  191.         <td valign="top" align="<?php echo $cell_align_left; ?>" nowrap="nowrap">
  192.         <?php require('./libraries/display_create_database.lib.php'); ?>
  193.         </td>
  194.     </tr>
  195.         <?php
  196.         echo "\n";
  197.  
  198.         // Server related links
  199.         ?>
  200.         <!-- server-related links -->
  201.         <?php
  202.         if ($cfg['ShowMysqlInfo']) {
  203. ?>
  204.     <tr><?php
  205.             echo '        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="./server_status.php?'.$common_url_query.'">','s_status.png',$strMySQLShowStatus,'</a>') : $str_normal_list);
  206. ?>
  207.         <td>
  208.                 <a href="./server_status.php?<?php echo $common_url_query; ?>">
  209.                     <?php echo $strMySQLShowStatus . "\n"; ?>
  210.                 </a>
  211.         </td>
  212.     </tr>
  213.             <?php
  214.         } // end if
  215.         if ($cfg['ShowMysqlVars']) {
  216. ?>
  217.     <tr><?php
  218.             echo '        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="./server_variables.php?'.$common_url_query.'">','s_vars.png',$strMySQLShowVars,'</a>') : $str_normal_list);
  219. ?>
  220.         <td>
  221.                 <a href="./server_variables.php?<?php echo $common_url_query; ?>"><?php echo $strMySQLShowVars;?></a> <?php echo PMA_showMySQLDocu('MySQL_Database_Administration', 'SHOW_VARIABLES') . "\n"; ?>
  222.         </td>
  223.     </tr>
  224.         <?php
  225.         }
  226. ?>
  227.     <tr><?php
  228.             echo '        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="./server_processlist.php?'.$common_url_query.'">','s_process.png',$strMySQLShowProcess,'</a>') : $str_normal_list);
  229. ?>
  230.         <td>
  231.                 <a href="./server_processlist.php?<?php echo $common_url_query; ?>">
  232.                     <?php echo $strMySQLShowProcess; ?></a> 
  233.                 <?php echo PMA_showMySQLDocu('MySQL_Database_Administration', 'SHOW_PROCESSLIST') . "\n"; ?>
  234.         </td>
  235.     </tr>
  236.         <?php
  237.  
  238.         if (PMA_MYSQL_INT_VERSION >= 40100) {
  239.             echo "\n";
  240.             ?>
  241.     <tr><?php
  242.             echo '        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="./server_collations.php?'.$common_url_query.'">','s_asci.png',$strCharsetsAndCollations,'</a>') : $str_normal_list);
  243. ?>
  244.         <td>
  245.                 <a href="./server_collations.php?<?php echo $common_url_query; ?>">
  246.                     <?php echo $strCharsetsAndCollations; ?></a> 
  247.         </td>
  248.     </tr>
  249.             <?php
  250.         }
  251.         ?>
  252.     <tr><?php
  253.             echo '        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="./server_engines.php?'.$common_url_query.'">','b_engine.png',$strStorageEngines,'</a>') : $str_normal_list);
  254. ?>
  255.         <td>
  256.                 <a href="./server_engines.php?<?php echo $common_url_query; ?>">
  257.                     <?php echo $strStorageEngines; ?></a> 
  258.         </td>
  259.     </tr>
  260.         <?php
  261.         if ($is_reload_priv) {
  262.             echo "\n";
  263.             ?>
  264.     <tr><?php
  265.             echo '        ' . ($str_iconic_list!='' ? sprintf($str_iconic_list,'<a href="main.php?'.$common_url_query.'&mode=reload">','s_reload.png',$strReloadMySQL,'</a>') : $str_normal_list);
  266. ?>
  267.         <td>
  268.                 <a href="main.php?<?php echo $common_url_query; ?>&mode=reload">
  269.                     <?php echo $strReloadMySQL; ?></a> 
  270.                 <?php echo PMA_showMySQLDocu('MySQL_Database_Administration', 'FLUSH') . "\n"; ?>
  271.         </td>
  272.     </tr>
  273.             <?php
  274.         }
  275.  
  276.         if ($is_superuser) {
  277.             echo "\n";
  278.             ?>
  279.     <tr><?php
  280.             echo '        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="server_privileges.php?'.$common_url_query.'">','s_rights.png',$strPrivileges,'</a>') : $str_normal_list);
  281. ?>
  282.         <td>
  283.                 <a href="server_privileges.php?<?php echo $common_url_query; ?>">
  284.                     <?php echo $strPrivileges; ?></a> 
  285.         </td>
  286.     </tr>
  287.             <?php
  288.         }
  289.  
  290.         $binlogs = PMA_DBI_try_query('SHOW MASTER LOGS', NULL, PMA_DBI_QUERY_STORE);
  291.         if ($binlogs) {
  292.             if (PMA_DBI_num_rows($binlogs) > 0) {
  293.                 ?>
  294.     <tr><?php
  295.             echo '        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="server_binlog.php?'.$common_url_query.'">','s_tbl.png',$strBinaryLog,'</a>') : $str_normal_list);
  296. ?>
  297.         <td>
  298.                 <a href="server_binlog.php?<?php echo $common_url_query; ?>">
  299.                     <?php echo $strBinaryLog; ?></a> 
  300.         </td>
  301.     </tr>
  302.                 <?php
  303.             }
  304.             PMA_DBI_free_result($binlogs);
  305.         }
  306.         unset($binlogs);
  307.         ?>
  308.     <tr><?php
  309.             echo '        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="server_databases.php?'.$common_url_query.'">','s_db.png',$strDatabases,'</a>') : $str_normal_list);
  310. ?>
  311.         <td>
  312.                 <a href="./server_databases.php?<?php echo $common_url_query; ?>">
  313.                     <?php echo $strDatabases; ?></a>
  314.         </td>
  315.     </tr>
  316.     <tr>
  317. <?php
  318.             echo '        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="server_export.php?'.$common_url_query.'">','b_export.png',$strExport,'</a>') : $str_normal_list);
  319. ?>
  320.         <td>
  321.                 <a href="./server_export.php?<?php echo $common_url_query; ?>">
  322.                     <?php echo $strExport; ?></a>
  323.         </td>
  324.     </tr>
  325.         <?php
  326.  
  327.         // Change password (needs another message)
  328.         if ($cfg['ShowChgPassword']) {
  329.             echo "\n";
  330.             ?>
  331.     <tr>
  332. <?php
  333.             echo '        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="user_password.php?'.$common_url_query.'">','s_passwd.png',$strChangePassword,'</a>') : $str_normal_list);
  334. ?>
  335.         <td>
  336.                 <a href="user_password.php?<?php echo $common_url_query; ?>">
  337.                     <?php echo ($strChangePassword); ?></a>
  338.         </td>
  339.     </tr>
  340.             <?php
  341.         } // end if
  342.  
  343.         // Logout for advanced authentication
  344.         if ($cfg['Server']['auth_type'] != 'config') {
  345.             $http_logout = ($cfg['Server']['auth_type'] == 'http')
  346.                          ? "\n"
  347. . '                <a href="./Documentation.html#login_bug" target="documentation">'
  348.                          . ($cfg['ReplaceHelpImg'] ? '<img src="' . $pmaThemeImage . 'b_info.png" width="11" height="11" border="0" alt="Info" align="middle" />' : '(*)') . '</a>'
  349.                          : '';
  350.             echo "\n";
  351.             ?>
  352.     <tr>
  353. <?php
  354.             echo '        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="index.php?'.$common_url_query.'&old_usr='.urlencode($PHP_AUTH_USER).'">','s_loggoff.png',$strLogout,'</a>') : $str_normal_list);
  355. ?>
  356.         <td>
  357.  
  358.                 <a href="index.php?<?php echo $common_url_query; ?>&old_usr=<?php echo urlencode($PHP_AUTH_USER); ?>" target="_parent">
  359.                     <b><?php echo $strLogout; ?></b></a> <?php echo $http_logout . "\n"; ?>
  360.         </td>
  361.     </tr>
  362.             <?php
  363.         } // end if
  364.         ?>
  365. </table>
  366. <?php
  367.     } // end if
  368. } // end of if ($server > 0)
  369. echo "\n";
  370.  
  371. ?>
  372. </td>
  373. <td width="20"> </td>
  374. <td valign="top">
  375. <table border="0" cellpadding="3" cellspacing="0">
  376.     <tr>
  377.         <th class="tblHeaders"<?php echo $str_iconic_colspan; ?>>  phpMyAdmin</th>
  378.     </tr>
  379. <?php
  380. // Displays language selection combo
  381. if (empty($cfg['Lang'])) {
  382.     ?>
  383.     <!-- Language Selection -->
  384.     <tr><?php
  385.         echo '        ' . ($str_iconic_list !='' ? sprintf($str_iconic_list,'<a href="./translators.html" target="documentation">','s_lang.png','Language','</a>') : $str_normal_list);
  386. ?>
  387.         <td nowrap="nowrap">
  388.             <form method="post" action="index.php" target="_parent">
  389.                 <input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
  390.                 <input type="hidden" name="server" value="<?php echo $server; ?>" />
  391.                 Language <a href="./translators.html" target="documentation"><?php
  392.                 if ($cfg['ReplaceHelpImg']){
  393.                     echo '<img src="' . $pmaThemeImage . 'b_info.png" border="0" width="11" height="11" alt="Info" hspace="1" vspace="1" />';
  394.                 }else{ echo '(*)'; }
  395. ?></a>: <select name="lang" dir="ltr" onchange="this.form.submit();" style="vertical-align: middle">
  396.     <?php
  397.     echo "\n";
  398.  
  399.     /**
  400.      * Sorts available languages by their true names
  401.      *
  402.      * @param   array   the array to be sorted
  403.      * @param   mixed   a required parameter
  404.      *
  405.      * @return  the sorted array
  406.      *
  407.      * @access  private
  408.      */
  409.     function PMA_cmp(&$a, $b)
  410.     {
  411.         return (strcmp($a[1], $b[1]));
  412.     } // end of the 'PMA_cmp()' function
  413.  
  414.     uasort($available_languages, 'PMA_cmp');
  415.     foreach ($available_languages AS $id => $tmplang) {
  416.         $lang_name = ucfirst(substr(strrchr($tmplang[0], '|'), 1));
  417.         if ($lang == $id) {
  418.             $selected = ' selected="selected"';
  419.         } else {
  420.             $selected = '';
  421.         }
  422.         echo '                        ';
  423.         echo '<option value="' . $id . '"' . $selected . '>' . $lang_name . ' (' . $id . ')</option>' . "\n";
  424.     }
  425.     ?>
  426.                 </select>
  427.                 <noscript><input type="submit" value="Go" style="vertical-align: middle" /></noscript>
  428.             </form>
  429.         </td>
  430.     </tr>
  431.  
  432.     <?php
  433. }
  434.  
  435. if (isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding']
  436.     && $server != 0 && $allow_recoding && PMA_MYSQL_INT_VERSION < 40100) {
  437.     echo "\n";
  438. ?>
  439.     <!-- Charset Selection -->
  440.     <tr><?php
  441.         echo '        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'','s_asci.png',$strMySQLCharset,'') : $str_normal_list);
  442. ?>
  443.         <td>
  444.             <form method="post" action="index.php" target="_parent">
  445.                 <input type="hidden" name="server" value="<?php echo $server; ?>" />
  446.                 <input type="hidden" name="lang" value="<?php echo $lang; ?>" />
  447.                 <?php echo $strMySQLCharset;?>:
  448.                 <select name="convcharset" dir="ltr" onchange="this.form.submit();" style="vertical-align: middle">
  449.     <?php
  450.     echo "\n";
  451.     foreach ($cfg['AvailableCharsets'] AS $id => $tmpcharset) {
  452.         if ($convcharset == $tmpcharset) {
  453.             $selected = ' selected="selected"';
  454.         } else {
  455.             $selected = '';
  456.         }
  457.         echo '                        '
  458.            . '<option value="' . $tmpcharset . '"' . $selected . '>' . $tmpcharset . '</option>' . "\n";
  459.     }
  460.     ?>
  461.                 </select>
  462.                 <noscript><input type="submit" value="Go" style="vertical-align: middle" /></noscript>
  463.             </form>
  464.         </td>
  465.     </tr>
  466.     <?php
  467. } elseif ($server != 0 && PMA_MYSQL_INT_VERSION >= 40100) {
  468.     echo '    <!-- Charset Info -->' . "\n"
  469.        . '    <tr>' .  "\n"
  470.        .'        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'','s_asci.png',$strMySQLCharset,'') : $str_normal_list) . "\n"
  471.        . '        <td>' . "\n"
  472.        . '            ' . $strMySQLCharset . ': '
  473.        . '            <b>'
  474.        . '               ' . $mysql_charsets_descriptions[$mysql_charset_map[strtolower($charset)]] . "\n"
  475.        . '               (' . $mysql_charset_map[strtolower($charset)] . ')' . "\n"
  476.        . '            </b>' . "\n"
  477.        . '        </td>' . "\n"
  478.        . '    </tr>' . "\n"
  479.        . '    <!-- MySQL Connection Collation -->' . "\n"
  480.        . '    <tr>' .  "\n"
  481.        .'        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'','s_asci.png',$strMySQLConnectionCollation,'') : $str_normal_list) . "\n"
  482.        . '        <td>' . "\n"
  483.        . '            <form method="post" action="index.php" target="_parent">' . "\n"
  484.        . PMA_generate_common_hidden_inputs(NULL, NULL, 4, 'collation_connection')
  485.        . '                <label for="select_collation_connection">' . "\n"
  486.        . '                    ' . $strMySQLConnectionCollation . ': ' . "\n"
  487.        . '                </label>' . "\n"
  488.        . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'collation_connection', 'select_collation_connection', $collation_connection, TRUE, 4, TRUE)
  489.        . '                <noscript><input type="submit" value="' . $strGo . '" style="vertical-align: middle" /></noscript>' . "\n"
  490.        // put the doc link in the form so that it appears on the same line
  491.        . PMA_showMySQLDocu('MySQL_Database_Administration', 'Charset-connection') . "\n"
  492.        . '            </form>' . "\n"
  493.        . '        </td>' . "\n"
  494.        . '    </tr>' . "\n";
  495. }
  496. echo "\n";
  497.  
  498. // added by Michael Keck <mail_at_michaelkeck_dot_de>
  499. // ThemeManager if available
  500.  
  501. if (isset($available_themes_choices) && $available_themes_choices > 1) {
  502.     $theme_selected = FALSE;
  503.     $theme_preview_path= './themes.php';
  504.     $theme_preview_href = '<a href="' . $theme_preview_path . '" target="themes" onclick="'
  505.                         . "window.open('" . $theme_preview_path . "','themes','left=10,top=20,width=510,height=350,scrollbars=yes,status=yes,resizable=yes');"
  506.                         . '">';
  507. ?>
  508.     <!-- Theme Manager -->
  509.     <tr>
  510. <?php
  511.         echo '        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,$theme_preview_href,'s_theme.png',(isset($strTheme) ? $strTheme : 'Theme (Style)'),'</a>') : $str_normal_list) . "\n";
  512. ?>
  513.         <td>
  514.             <form name="setTheme" method="post" action="index.php" target="_parent">
  515.                 <?php
  516.                 echo PMA_generate_common_hidden_inputs('', '', 5);
  517.                 echo $theme_preview_href
  518.                    . (isset($strTheme) ? $strTheme : 'Theme (Style)')
  519.                    . '</a>:' . "\n";
  520.                 ?>
  521.                 <select name="set_theme" dir="ltr" onchange="this.form.submit();" style="vertical-align: middle">
  522.                 <?php
  523.                     foreach ($available_themes_choices AS $cur_theme) {
  524.                         echo '<option value="' . $cur_theme . '"';
  525.                         if ($cur_theme == $theme) {
  526.                             echo ' selected="selected"';
  527.                         }
  528.                         echo '>' . htmlspecialchars($available_themes_choices_names[$cur_theme]) . '</option>';
  529.                     }
  530.                 ?>
  531.                 </select>
  532.                 <noscript><input type="submit" value="Go" style="vertical-align: middle" /></noscript>
  533.             </form>
  534.         </td>
  535.     </tr>
  536. <?php
  537. }
  538. ?>
  539.     <!-- Documentation -->
  540.     <tr><?php
  541.         echo '        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="Documentation.html" target="documentation">','b_docs.png',$strPmaDocumentation,'</a>') : $str_normal_list);
  542. ?>
  543.         <td nowrap="nowrap">
  544.             <a href="Documentation.html" target="documentation"><b><?php echo $strPmaDocumentation; ?></b></a>
  545.         </td>
  546.     </tr>
  547.  
  548. <?php
  549. if ($is_superuser || $cfg['ShowPhpInfo']) {
  550.     ?>
  551.     <!-- PHP Information -->
  552.     <tr><?php
  553.         echo '        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="phpinfo.php?' . PMA_generate_common_url() . '" target="_blank">','php_sym.png',$strShowPHPInfo,'</a>') : $str_normal_list);
  554. ?>
  555.         <td nowrap="nowrap">
  556.             <a href="phpinfo.php?<?php echo PMA_generate_common_url(); ?>" target="_blank"><?php echo $strShowPHPInfo; ?></a>
  557.         </td>
  558.     </tr>
  559.     <?php
  560. }
  561. echo "\n";
  562. ?>
  563.  
  564.         <!-- phpMyAdmin related urls -->
  565.     <tr><?php
  566.         echo '        ' . ($str_iconic_list != '' ? sprintf($str_iconic_list,'<a href="http://www.phpMyAdmin.net/" target="_blank">','b_home.png',$strHomepageOfficial,'</a>') : $str_normal_list);
  567. ?>
  568.         <td nowrap="nowrap">
  569.             <a href="http://www.phpMyAdmin.net/" target="_blank"><?php echo $strHomepageOfficial; ?></a>
  570.        </td>
  571.     </tr>
  572.     <tr>
  573. <?php
  574.         echo '<td><img src="' .$GLOBALS['pmaThemeImage'] . 'spacer.png'  . '" width="1" height="1" border="0" /></td>';
  575. ?>
  576.        <td nowrap="nowrap">
  577.             [<a href="changelog.php" target="_blank">ChangeLog</a>]
  578.                [<a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmyadmin/phpMyAdmin/" target="_blank">CVS</a>]
  579.                [<a href="http://sourceforge.net/mail/?group_id=23067" target="_blank">Lists</a>]
  580.        </td>
  581.     </tr>
  582. </table>
  583.  
  584. </td>
  585. </tr>
  586. </table>
  587.  
  588. <hr />
  589.  
  590.  
  591. <?php
  592. /**
  593.  * Removed the "empty $cfg['PmaAbsoluteUri']" warning on 2005-08-23
  594.  * See https://sourceforge.net/tracker/index.php?func=detail&aid=1257134&group_id=23067&atid=377411
  595.  */
  596.  
  597. /**
  598.  * Warning if using the default MySQL privileged account
  599.  * modified: 2004-05-05 mkkeck
  600.  */
  601. if ($server != 0
  602.     && $cfg['Server']['user'] == 'root'
  603.     && $cfg['Server']['password'] == '') {
  604.     echo '<div class="warning">' . $strInsecureMySQL . '</div>' . "\n";
  605. }
  606.  
  607. /**
  608.  * Warning for PHP 4.2.3
  609.  * modified: 2004-05-05 mkkeck
  610.  */
  611.  
  612. if (PMA_PHP_INT_VERSION == 40203 && @extension_loaded('mbstring')) {
  613.     echo '<div class="warning">' . $strPHP40203 . '</div>' . "\n";
  614. }
  615.  
  616. /**
  617.  * Nijel: As we try to hadle charsets by ourself, mbstring overloads just
  618.  * break it, see bug 1063821.
  619.  */
  620.  
  621. if (@extension_loaded('mbstring') && @ini_get('mbstring.func_overload') > 1) {
  622.     echo '<div class="warning">' . $strMbOverloadWarning . '</div>' . "\n";
  623. }
  624.  
  625. /**
  626.  * Nijel: mbstring is used for handling multibyte inside parser, so it is good
  627.  * to tell user something might be broken without it, see bug #1063149.
  628.  */
  629. if ($GLOBALS['using_mb_charset'] && !@extension_loaded('mbstring')) {
  630.     echo '<div class="warning">' . $strMbExtensionMissing . '</div>' . "\n";
  631. }
  632.  
  633. /**
  634.  * Warning for old PHP version
  635.  * modified: 2004-05-05 mkkeck
  636.  */
  637.  
  638. if (PMA_PHP_INT_VERSION < 40100) {
  639.     echo '<div class="warning">' . sprintf($strUpgrade, 'PHP', '4.1.0') . '</div>' . "\n";
  640. }
  641.  
  642. /**
  643.  * Warning for old MySQL version
  644.  * modified: 2004-05-05 mkkeck
  645.  */
  646. // not yet defined before the server choice
  647. if (defined('PMA_MYSQL_INT_VERSION') && PMA_MYSQL_INT_VERSION < 32332) {
  648.     echo '<div class="warning">' . sprintf($strUpgrade, 'MySQL', '3.23.32') . '</div>' . "\n";
  649. }
  650. /**
  651.  * Displays the footer
  652.  */
  653. echo "\n";
  654. require_once('./footer.inc.php');
  655. ?>
  656.